home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_paulsegg.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  136 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_Paul's Egg.cog
  4. #
  5. # Easter egg control for Paul Lefevre.
  6. #
  7. # [CM]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.     
  15. #...............MESSAGES..............
  16.     message      startup
  17.     message      activated
  18.     
  19.  
  20. #...............ACTORS..............
  21.     thing        player                                    local
  22.     thing        indyActor                                    
  23.  
  24. #...............ACTOR MARKS.............
  25.     thing        in_MK0
  26.  
  27. #...............CAMERAS..............
  28.     thing        eggcam
  29.  
  30. #...............LOOK TARGETS..............
  31.     thing        in_lktarg1
  32.  
  33. #...............PROPS..............
  34.     surface        eggsurf         
  35.     surface        actsurf         
  36.  
  37.     
  38. #...............MATERIALS..............
  39.     material    eggskin=VOL_princess.mat                local
  40.  
  41.  
  42. #...............SOUNDS..............
  43.     sound   in_princess=tm06j02.wav                        local
  44.     sound   zap=aet_gemdoor_stop.wav                    local
  45.  
  46.  
  47. #...............VARIABLES..............
  48.     int        shown=0                                        local
  49.     int        track                                        local
  50.  
  51.  
  52. #...............KEYFRAMES..............
  53.     keyframe    in_hat=0in_figithat_4_4.key                local
  54.     keyframe    in_brush=0in_stand1_bd_4.key            local
  55.     keyframe    in_stand4=0in_stand4.key                local
  56.  
  57. end
  58.  
  59. # ========================================================================================
  60. code
  61.  
  62. startup:
  63.     
  64.     player=GetLocalPlayerThing();
  65.     
  66. return;
  67.  
  68. # ========================================================================================
  69. activated:
  70.  
  71.     If (GetSenderRef() != actsurf) return;
  72.     If (shown == 1) return;
  73.     {
  74.         shown = 1;    # scene will not repeat
  75.         
  76.         MakeMeStop();
  77.         DeselectWeaponWait(player);
  78.         
  79.         StartCutScene(1);
  80.         SetActorFlags(player, 0x200000);
  81.  
  82.         # Set up actor
  83.         CopyPlayerHolsters(player, indyActor);
  84.         CopyOrientAndPos(player, indyActor);
  85.         AISetCutSceneMode(indyActor);
  86.         SetThingFlags(player, 0x80000);
  87.         ClearThingFlags(indyActor, 0x80000);
  88.         PlayMode(indyActor, 60, 1);
  89.  
  90.         # change the material
  91.         PlaySoundLocal(zap, 0.5, 0.0, 0x0, 0);
  92.         SetSurfaceMat(eggsurf, eggskin);
  93.     
  94.         # move cam to known position
  95.         SetExtCamOffsetToThing(eggcam);
  96.         
  97.         # move the actor into position
  98.         AIEnableHeadTracking(indyActor, in_lktarg1);
  99.         AISetLookThing(indyActor, in_lktarg1);
  100.         AISetMoveSpeed(indyActor, 1.0);
  101.         AISetMoveThing(indyActor, in_MK0, 1);
  102.         
  103.         # play indy's anims and voice line
  104.         track = PlayKey(indyActor, in_Stand4, 2, 0x0, 0);
  105.         PlayVoice(indyActor, in_princess, 1.0, 0);
  106.         PlayKey(indyActor, in_hat, 4, 0x12, 0);
  107.  
  108.         # offset camera to thing.
  109.         SetExtCamLookOffsetToThing(in_lktarg1);
  110.  
  111.         Sleep(2.0);
  112.  
  113.         # put the player at actors' position, clear actor, show player
  114.         CopyOrientAndPos(indyActor, player);
  115.         AIClearCutSceneMode(indyActor);
  116.         AIDisableHeadTracking(indyActor);
  117.         ClearThingFlags(player, 0x80000);
  118.         StopKey(indyActor, track, 0);
  119.         SetThingFlags(indyActor, 0x80000);
  120.     
  121.         # Restore the cam, end the scene
  122.         SetCameraPosition(1, GetThingPos(eggcam));
  123.         SetCurrentCamera(1);
  124.         RestoreExtCam();
  125.         SetCameraFOV(90, 0, 0.0);
  126.         ClearActorFlags(player, 0x200000);
  127.         EndCutScene();
  128.     
  129.     }
  130. return;
  131.  
  132. # ========================================================================================
  133. end
  134.  
  135.  
  136.